import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 按需加载 element.ui
import ElementUI from './plugins/element'
ElementUI(Vue)

import bus from '@/utils/bus.js'
Vue.prototype.$bus = bus

import api from '@/api/index'
Vue.prototype.$api = api

import storage from '@/utils/storage'
Vue.prototype.$storage = storage

import {prd} from '@/config'

// 文件云url
Vue.prototype.$cloud = prd.cloud
Vue.prototype.$admin = prd.admin

import {
  Message,
  MessageBox,
  Notification,
  Loading
} from 'element-ui'
Vue.prototype.$message = Message
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$notify = Notification // 通知
Vue.prototype.$loading = Loading // 加载动画


// md
import MarkdownItVue from 'markdown-it-vue'
import 'markdown-it-vue/dist/markdown-it-vue.css'
Vue.component('MarkdownItVue', MarkdownItVue)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')